package malus.shaofeng.com.beiwomusic.activity;

import android.app.Activity;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;

import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ContentView;
import com.lidroid.xutils.view.annotation.ViewInject;

import malus.shaofeng.com.beiwomusic.R;
import malus.shaofeng.com.beiwomusic.model.BbsReply;
import malus.shaofeng.com.beiwomusic.view.SildingFinishLayout;
import malus.shaofeng.com.beiwomusic.view.Topbar;

@ContentView(R.layout.activity_bbs_put_topic)
public class BbsPutTopicActivity extends Activity implements Topbar.onTopbarClickListener {
    @ViewInject(R.id.slidingFinishLayout)
    SildingFinishLayout slidingFinishLayout;
    @ViewInject(R.id.topbar)
    Topbar topbar;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState);
        ViewUtils.inject(this);
        slidingFinishLayout.setOnSildingFinishListener(new SildingFinishLayout.OnSildingFinishListener() {
            @Override
            public void onSildingFinish() {
                BbsPutTopicActivity.this.finish();
                overridePendingTransition(0,R.anim.trans_slider_out);
            }
        });
        topbar.setOnTopbarClickListener(this);
    }

    @Override
    public void onBackPressed() {
        finish();
        overridePendingTransition(0,R.anim.trans_slider_out);
    }

    @Override
    public void onLeftButtonClick() {
        finish();
        overridePendingTransition(0,R.anim.trans_slider_out);
    }

    @Override
    public void onRightButtonClick() {

    }

    @Override
    public void onSearchButtonClick() {

    }
}
